
import VueRouter from 'vue-router'

//导入 tabbar 各个模块
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContanier from './components/tabbar/MemberContanier.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'

import newlist from './components/news/newsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from "./components/photos/PhotoList.vue";
import PhotoInfo from "./components/photos/PhotoInfo.vue";
import GoodList from "./components/goods/GoodList.vue";
import GoodInfo from "./components/goods/GoodInfo.vue"
import GoodsDesc from "./components/goods/GoodsDesc.vue"
import GoodsComments from "./components/goods/GoodsComments.vue"

var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:HomeContainer},
    {path:'/member',component:MemberContanier},
    {path:'/shopcar',component:ShopcarContainer},
    {path:'/search',component:SearchContainer},
    {path:'/home/newlist',component:newlist},
    {path:'/home/newsinfo/:id',component:NewsInfo},
    {path:'/home/photolist',component:PhotoList},
    {path:'/home/photoinfo/:id',component:PhotoInfo},
    {path:'/home/goodlist',component:GoodList},
    {path:'/home/goodsinfo/:id',component:GoodInfo, name:'goodsinfo' },
    {path:'/home/goodsdesc/:id',component:GoodsDesc, name:'goodsdesc' },
    {path:'/home/goodscomments/:id',component:GoodsComments, name:'goodscomments' },
  ],
  linkActiveClass:'mui-active'
})

//把路由模块暴露出去
export default router